<?php !function_exists('IFZEAI') && exit('Forbidden!');
if(ifint($cook_uid)){
	$tipnum  = $db->ROW(__TBL_USER__,"nickname,photo_s,photo_f,tipnum","id=".$cook_uid,'name');
	$data_photo_s = $tipnum['photo_s'];
	$data_photo_f = $tipnum['photo_f'];
	$cook_nickname = trimhtml($tipnum['nickname'],'out');
	$tipnum=$tipnum['tipnum'];$iftipnum=1;
}
//门店
$navtitle=(!empty($AGT) && !empty($AGT['title']))?trimhtml($AGT['title']):'首页';
//门店结束
?><link href="<?php echo HOST;?>/cache/zeaicolor.css?<?php echo $_ZEAI['cache_str'];?>" rel="stylesheet" type="text/css" />
<style>
.nav .logined .embox dl dd a:hover,.nav .logined .embox dl dd a:hover i,
.about .L a.ed,.about .R h1:after,
.Zeai_sidebar li:last-child,.Zeai_sidebar li:hover,
.datingkind .kind a.ed i,.main .datingR .addbox a.ed, .main .datingR .addbox a:hover,.dating h1:after,
.main .datingL .list dl em li:last-child a.ed,.main .datingL .list dl em li:last-child a:hover,.datingL .C em li:last-child a,
.party .partyL li .bmed,.party .pRbox h1:after,
.HONG,.myRC .sx dl button,.photoboxR .qdbtn,
.my_loveb .ye .btnA,
.user h1:after,.sokind a:after,.main1 .photou li span,
.party_dtl .dtl .party_btn a.ed,.party_dtlc .box h1:after,
.main .trendR .addbox a.ed,.trend .trendR h1:after,
.newskind a.ed,.news h1:after,.video h1:after,.main .videoR .addbox a.ed,
.hongbaokind a.ed,.hongbao h1:after,
.match ul li a:last-child:hover,.myRC .honged{background-color:<?php echo $_ZEAI['mob_mbcolor'];?>}
/**/
.main .datingL .list dl em li:last-child a.ed,.main .datingL .list dl em li:last-child a:hover,
.party .partyL li .bmed,
.myRM .tab a.ed,.myRC .sx dl button.ed,
.main1 .photou li.ed,
.newskind a.ed,
.myRC .hong,
.hongbaokind a.ed,
.iubox .apply,.main1 .uinfo h2 div.ed{border-color:<?php echo $_ZEAI['mob_mbcolor'];?>}
/**/
.about .L a:hover,.about .L a i,.news a:hover,
.datingkind .kind a.ed span,.datingL .C .CC dl dd,
.main .mainL a.ed em,.main .mainL a:hover,.myRM .tab a.ed,.myRM .tab a:hover,.myRC .sx dl button.ed,
.sokind a.ed,.sokind a:hover,.user .sonickname button,
.myRC .hong,.tipsbox .tipst,
.iubox .apply,.so .news .dd a:hover,.main1 .uinfo em a,.main1 .uinfo h2 div.ed,.nav ul .idx .embox dl a.on{color:<?php echo $_ZEAI['mob_mbcolor'];?>}
/**/
.Zeai_sidebar li em:after{background:url("<?php echo RES;?>p/img/ico.png") left -7px no-repeat;}
.main .mainL a.ed em{background-color:rgba(<?php echo c16_rgb($_ZEAI['mob_mbcolor']);?>,.08)}
/**/
.radioskin:checked + label.radioskin-label i{border-color:<?php echo $_ZEAI['mob_mbcolor'];?>}
.radioskin:checked + label.radioskin-label i:before{background-color:<?php echo $_ZEAI['mob_mbcolor'];?>}
.radioskin-label:hover i{border-color:<?php echo $_ZEAI['mob_mbcolor'];?>}
.checkskin-label:hover i{border-color:<?php echo $_ZEAI['mob_mbcolor'];?>}
.checkskin:checked + label.checkskin-label i {background-color:<?php echo $_ZEAI['mob_mbcolor'];?>;border-color:<?php echo $_ZEAI['mob_mbcolor'];?>}
.switch:checked + label.switch-label{background-color:<?php echo $_ZEAI['mob_mbcolor'];?>;border-color:<?php echo $_ZEAI['mob_mbcolor'];?>}
</style>
<div class="navbox zeaibg">
	<div class="nav">
        <a href="<?php echo HOST;?>" title="返回首页" class="logo"><img src="<?php echo UP.$_ZEAI['pclogo'];?>?<?php echo $_ZEAI['cache_str'];?>"></a>
        <ul>
        	<div <?php echo ($nav=='index')?' class="ed idx"':' class="idx"';?>>
            	<span onclick="zeai.openurl('<?php echo HOST;?>')"><?php echo $navtitle;?></span>
                <div class="j S5"></div>
                <div class="embox S5">
                    <dl>
						<?php 
                        $rt2=$db->query("SELECT id,title FROM ".__TBL_CRM_AGENT__." WHERE flag=1 ORDER BY px DESC,id DESC");
                        $total2 = $db->num_rows($rt2);
                        if ($total2 > 0) {
							echo '<a href="'.HOST.'/?agentid=all" class="idxbtn">进入总站</a>';
							for($j=0;$j<$total2;$j++) {
								$rows2 = $db->fetch_array($rt2,'num');
								if(!$rows2) break;?>
								<a href="<?php echo HOST.'/?agentid='.$rows2[0];?>"<?php echo ($cook_agentid==$rows2[0] && $agentid!='all')?' class="on"':'';?>><i class="ico">&#xe7d5;</i><?php echo trimhtml($rows2[1]);?></a>
                        <?php }}?>
                    </dl>
                </div>
            </div>
            <li>
        	<a href="<?php echo HOST;?>/p/my.php"<?php echo ($nav=='my')?' class="ed"':'';?>>我的</a>
        	<a href="<?php echo Href('user');?>"<?php echo ($nav=='user')?' class="ed"':'';?>>找缘分</a>
            <?php 
			if($_ZEAI['navkind']==2){
				$navdiy = json_decode($_ZEAI['navdiy'],true);
				if (count($navdiy) >= 1 && is_array($navdiy)){
					foreach ($navdiy as $V){
						$Vurl=dataIO($V['url2'],'out');$Vvar=dataIO($V['var'],'out');
						if($V['f']==0 || empty($V['t']) || empty($Vurl))continue;
						?><a href="<?php echo $Vurl;?>"<?php echo ($nav==$Vvar)?' class="ed"':'';?>><span><?php echo dataIO($V['t'],'out');?></span></a><?php }
				}
			}else{?>
                <?php if(@in_array('dating',$navarr)){?><a href="<?php echo Href('dating');?>"<?php echo ($nav=='dating')?' class="ed"':'';?>>约会</a><?php }?>
                <?php if(@in_array('party',$navarr)){?><a href="<?php echo Href('party');?>"<?php echo ($nav=='party')?' class="ed"':'';?>>活动</a><?php }?>
                <?php if(@in_array('hn',$navarr)){?><a href="<?php echo Href('hongniang');?>"<?php echo ($nav=='hongniang')?' class="ed"':'';?>>红娘</a><?php }?>
                <?php if(@in_array('trend',$navarr)){?><a href="<?php echo Href('trend');?>"<?php echo ($nav=='trend')?' class="ed"':'';?>>动态</a><?php }?>
                <?php if(@in_array('article',$navarr)){?><a href="<?php echo Href('news');?>"<?php echo ($nav=='news')?' class="ed"':'';?>>学堂</a><?php }?>
                <?php if(@in_array('video',$navarr)){?><a href="<?php echo Href('video');?>"<?php echo ($nav=='video')?' class="ed"':'';?>>视频</a><?php }?>
                <?php if(@in_array('hb',$navarr)){?><a href="<?php echo Href('hongbao');?>"<?php echo ($nav=='hongbao')?' class="ed"':'';?>>红包</a><?php }?>
            <?php }?>
            <li>
        </ul>
        <?php
		if (ifint($cook_uid)){
			if(!empty($data_photo_s)){
				$cook_photo_s=$data_photo_s;
			}else{
				$cook_photo_s='';
			}
			$cook_photo_s_url = (!empty($cook_photo_s) )?UP.$cook_photo_s:RES.'photo_s'.$cook_sex.'.png';
			$cook_photo_m_url = (!empty($cook_photo_s) )?UP.smb($cook_photo_s,'m'):RES.'photo_m'.$cook_sex.'.png';
			$sexbg       = (empty($cook_photo_s))?' class="m sexbg'.$cook_sex.'"':'class="m"';
			$photo_str   = '<img src="'.$cook_photo_s_url.'"'.$sexbg.'>';
			$photo_str_index = '<img src="'.$cook_photo_m_url.'"'.$sexbg.'>';
			?>
            <div class="logined S5" onClick="zeai.openurl('<?php echo HOST;?>/p/my.php')">
                <?php echo $photo_str;?><span><?php echo (empty($cook_nickname)?$cook_uname:$cook_nickname);?></span><i class="ico xj">&#xe60b;</i>
                <div class="j S5"></div>
                <div class="embox S5">
                <dl>
                	<dt>
                    	<a href="<?php echo HOST;?>/p/my_vip.php" class="vip"><i class="ico">&#xe6ab;</i>升级VIP</a>
                    	<a href="<?php echo HOST;?>/p/my_loveb.php" class="zeaibg zeaiborder"><i class="ico zeaibg zeaiborder">&#xe618;</i><?php echo $_ZEAI['loveB'];?>账户</a>
                    	<a href="<?php echo HOST;?>/loginout.php">退出登录</a>
                    </dt>
                    <dd>
                    	<?php if (in_array('chat',$navarr)){?><a href="<?php echo HOST;?>/p/my_msg.php"><i class="ico">&#xe641;</i>私信消息</a><?php }?>
                    	<a href="<?php echo HOST;?>/p/my_msg.php?t=4"><i class="ico">&#xe657;</i>系统通知</a>
                    	<a href="<?php echo HOST;?>/p/my_browse.php"><i class="ico">&#xe626;</i>谁看过我</a>
                    	<a href="<?php echo HOST;?>/p/my.php"><i class="ico">&#xe64b;</i>每日签到</a>
                    	<a href="<?php echo HOST;?>/p/my_info.php"><i class="ico">&#xe619;</i>完善资料</a>
                    	<a href="<?php echo HOST;?>/p/my_info.php"><i class="ico">&#xe609;</i>上传头像</a>
                    	<a href="<?php echo HOST;?>/p/my_cert.php"><i class="ico rectico">&#xe66b;</i>诚信认证</a>
                    	<a href="<?php echo HOST;?>/p/my_set.php?t=3"><i class="ico passico">&#xe620;</i>修改密码</a>
                    </dd>
                </dl>
                </div>
            </div>
            <div class="msgvip">
                <a href="<?php echo HOST;?>/p/my_msg.php" title="私信/通知"><i class="ico">&#xe787;</i><?php if ($tipnum>0){?><b><?php echo $tipnum;?></b><?php }?></a>
                <a href="<?php echo HOST;?>/p/my_vip.php" title="开通VIP会员"><i class="ico">&#xe6ab;</i></a>
            </div>
        <?php }else{?>
        	<div class="loginreg"><a href="<?php echo HOST;?>/p/login.php"><i class="ico">&#xe607;</i> 登录</a> | <a href="<?php echo HOST;?>/p/reg.php">注册</a></div>
        <?php }?>
    </div>
</div>
